package mysql_sync

type DiscoverFormat struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Details struct {
		Slave_SQL_Running          bool `json:"slave_SQL_Running"`
		ReplicationSQLThreadRuning bool `json:"ReplicationSQLThreadRuning"`
		Slave_IO_Running           bool `json:"Slave_IO_Running"`
		ReplicationIOThreadRuning  bool `json:"ReplicationIOThreadRuning"`
	} `json:"details"`
}

type TopologyFormat struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Details string `json:"details"`
}

type ClusterInfo struct {
	ClusterName                            string `json:"clusterName"`
	ClusterAlias                           string `json:"clusterAlias"`
	ClusterDomain                          string `json:"clusterDomain"`
	CountInstances                         int    `json:"countInstances"`
	HeuristicLag                           int    `json:"heuristicLag"`
	HasAutomatedMasterRecovery             bool   `json:"hasAutomatedMasterRecovery"`
	HasAutomatedIntermediateMasterRecovery bool   `json:"hasAutomatedIntermediateMasterRecovery"`
}

type TopologyInfo struct {
	Key struct {
		Hostname string `json:"hostname"`
		Port     uint32 `json:"port"`
	} `json:"key"`
	InstanceAlias                string `json:"instancealias"`
	Uptime                       int    `json:"uptime"`
	ServerID                     int    `json:"serverid"`
	ServerUUID                   string `json:"serveruuid"`
	Version                      string `json:"version"`
	VersionComment               string `json:"versioncomment"`
	FlavorName                   string `json:"flavorname"`
	ReadOnly                     bool   `json:"readonly"`
	Binlog_format                string `json:"binlog_format"`
	BinlogRowImage               string `json:"binlogrowimage"`
	LogBinEnabled                bool   `json:"logbinenabled"`
	LogSlaveUpdatesEnabled       bool   `json:"logslaveupdatesenabled"`
	LogReplicationUpdatesEnabled bool   `json:"logreplicationupdatesenabled"`
	SelfBinlogCoordinates        struct {
		LogFile string `json:"logfile"`
		LogPos  int    `json:"logpos"`
		Type    int    `json:"type"`
	} `json:"selfbinlogcoordinates"`
	MasterKey struct {
		Hostname string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"masterkey"`
	MasterUUID                 string `json:"masteruuid"`
	AncestryUUID               string `json:"ancestryuuid"`
	IsDetachedMaster           bool   `json:"isdetachedmaster"`
	Slave_SQL_Running          bool   `json:"slave_sql_running"`
	ReplicationSQLThreadRuning bool   `json:"replicationsqlthreadruning"`
	Slave_IO_Running           bool   `json:"slave_io_running"`
	ReplicationIOThreadRuning  bool   `json:"replicationiothreadruning"`
	ReplicationSQLThreadState  int    `json:"replicationsqlthreadstate"`
	ReplicationIOThreadState   int    `json:"replicationiothreadstate"`
	HasReplicationFilters      bool   `json:"hasreplicationfilters"`
	GTIDMode                   string `json:"gtidmode"`
	SupportsOracleGTID         bool   `json:"supportsoraclegtid"`
	UsingOracleGTID            bool   `json:"usingoraclegtid"`
	UsingMariaDBGTID           bool   `json:"usingmariadbgtid"`
	UsingPseudoGTID            bool   `json:"usingpseudogtid"`
	ReadBinlogCoordinates      struct {
		LogFile string `json:"logfile"`
		LogPos  int    `json:"logpos"`
		Type    int    `json:"type"`
	} `json:"readbinlogcoordinates"`
	ExecBinlogCoordinates struct {
		LogFile string `json:"logfile"`
		LogPos  int    `json:"logpos"`
		Type    int    `json:"type"`
	} `json:"execbinlogcoordinates"`
	IsDetached          bool `json:"isdetached"`
	RelaylogCoordinates struct {
		LogFile string `json:"logfile"`
		LogPos  int    `json:"logpos"`
		Type    int    `json:"type"`
	} `json:"relaylogcoordinates"`
	LastSQLError        string `json:"lastsqlerror"`
	LastIOError         string `json:"lastioerror"`
	SecondsBehindMaster struct {
		Int64 int  `json:"int64"`
		Valid bool `json:"valid"`
	} `json:"secondsbehindmaster"`
	SQLDelay        int    `json:"sqldelay"`
	ExecutedGtidSet string `json:"executedgtidset"`
	GtidPurged      string `json:"gtidpurged"`
	GtidErrant      string `json:"gtiderrant"`
	SlaveLagSeconds struct {
		Int64 int  `json:"int64"`
		Valid bool `json:"valid"`
	} `json:"slavelagseconds"`
	ReplicationLagSeconds struct {
		Int64 int  `json:"int64"`
		Valid bool `json:"valid"`
	} `json:"replicationlagseconds"`
	SlaveHosts []struct {
		Hostname string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"slavehosts"`
	Replicas []struct {
		Hostname string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"replicas"`
	ClusterName                       string `json:"clustername"`
	SuggestedClusterAlias             string `json:"suggestedclusteralias"`
	DataCenter                        string `json:"datacenter"`
	Region                            string `json:"region"`
	PhysicalEnvironment               string `json:"physicalenvironment"`
	ReplicationDepth                  int    `json:"replicationdepth"`
	IsCoMaster                        bool   `json:"iscomaster"`
	HasReplicationCredentials         bool   `json:"hasreplicationcredentials"`
	ReplicationCredentialsAvailable   bool   `json:"replicationcredentialsavailable"`
	SemiSyncAvailable                 bool   `json:"semisyncavailable"`
	SemiSyncPriority                  int    `json:"semisyncpriority"`
	SemiSyncMasterEnabled             bool   `json:"semisyncmasterenabled"`
	SemiSyncReplicaEnabled            bool   `json:"semisyncreplicaenabled"`
	SemiSyncMasterTimeout             int    `json:"semisyncmastertimeout"`
	SemiSyncMasterWaitForReplicaCount int    `json:"semisyncmasterwaitforreplicacount"`
	SemiSyncMasterStatus              bool   `json:"semisyncmasterstatus"`
	SemiSyncMasterClients             int    `json:"semisyncmasterclients"`
	SemiSyncReplicaStatus             bool   `json:"semisyncreplicastatus"`
	LastSeenTimestamp                 string `json:"lastseentimestamp"`
	IsLastCheckValid                  bool   `json:"islastcheckvalid"`
	IsUpToDate                        bool   `json:"isuptodate"`
	IsRecentlyChecked                 bool   `json:"isrecentlychecked"`
	SecondsSinceLastSeen              struct {
		Int64 int  `json:"int64"`
		Valid bool `json:"valid"`
	} `json:"secondssincelastseen"`
	CountMySQLSnapshots             int      `json:"countmysqlsnapshots"`
	IsCandidate                     bool     `json:"iscandidate"`
	PromotionRule                   string   `json:"promotionrule"`
	IsDowntimed                     bool     `json:"isdowntimed"`
	DowntimeReason                  string   `json:"downtimereason"`
	DowntimeOwner                   string   `json:"downtimeowner"`
	DowntimeEndTimestamp            string   `json:"downtimeendtimestamp"`
	ElapsedDowntime                 int      `json:"elapseddowntime"`
	UnresolvedHostname              string   `json:"unresolvedhostname"`
	AllowTLS                        bool     `json:"allowtls"`
	Problems                        []string `json:"problems,omitempty"`
	LastDiscoveryLatency            int      `json:"lastdiscoverylatency"`
	GroupName                       string   `json:"groupname"`
	ReplicationGroupIsSinglePrimary bool     `json:"replicationgroupissingleprimary"`
	ReplicationGroupMemberState     string   `json:"replicationgroupmemberstate"`
	ReplicationGroupMemberRole      string   `json:"replicationgroupmemberrole"`
	ReplicationGroupMembers         []struct {
	} `json:"replicationgroupmembers"`
	ReplicationGroupPrimaryInstanceKey struct {
		Hostname string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"replicationgroupprimaryinstancekey"`
}
